//
//  CellForMyExploreTableViewSectionZeroAndTwo.m
//  echo
//
//  Created by dllo on 16/1/29.
//  Copyright © 2016年 Danny. All rights reserved.
//

#define WIDTH [UIScreen mainScreen].bounds.size.width / 414
#define HEIGHT [UIScreen mainScreen].bounds.size.height / 736

#import "CellForMyExploreTableViewSectionZeroAndTwo.h"
#import <SDWebImage/UIImageView+WebCache.h>
#import "ModelOfCellForMyExploreTableViewSectionZero.h"
#import <SDWebImage/UIButton+WebCache.h>
#import <SDWebImage/UIImageView+WebCache.h>
#import "ModelOfCellForMyExploreTableViewSectionTwo.h"
#import <DKNightVersion.h>

@implementation CellForMyExploreTableViewSectionZeroAndTwo

- (void)dealloc{
    [_viewOfBack release];
    [_button1 release];
    [_button2 release];
    [_button3 release];
    [_button4 release];
    [_button5 release];
    [_labelForTop1 release];
    [_labelForBottom1 release];
    [_labelForTop2 release];
    [_labelForBottom2 release];
    [_labelForTop3 release];
    [_labelForBottom3 release];
    [_labelForTop4 release];
    [_labelForBottom4 release];
    [_labelForTop5 release];
    [_labelForBottom5 release];
    [_imageView1 release];
    [_imageView2 release];
    [_imageView3 release];
    [_imageView4 release];
    [_imageView5 release];
    [_arrForSectionZero release];
    [_arrForSectionTwo release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.viewOfBack = [[UIView alloc]init];
        [self.contentView addSubview:self.viewOfBack];
        [self.viewOfBack release];
        
        self.button1 = [UIButton buttonWithType:UIButtonTypeCustom];
        self.button2 = [UIButton buttonWithType:UIButtonTypeCustom];
        self.button3 = [UIButton buttonWithType:UIButtonTypeCustom];
        self.button4 = [UIButton buttonWithType:UIButtonTypeCustom];
        self.button5 = [UIButton buttonWithType:UIButtonTypeCustom];
        [self.viewOfBack addSubview:self.button1];
        [self.viewOfBack addSubview:self.button2];
        [self.viewOfBack addSubview:self.button3];
        [self.viewOfBack addSubview:self.button4];
        [self.viewOfBack addSubview:self.button5];
        
        self.labelForTop1 = [[UILabel alloc]init];
        [self.viewOfBack addSubview:self.labelForTop1];
        [self.labelForTop1 release];
        self.labelForTop1.font = [UIFont fontWithName:@"Arial" size:16.0];
        self.labelForTop1.textAlignment = NSTextAlignmentCenter;
        
        self.labelForBottom1 = [[UILabel alloc]init];
        [self.viewOfBack addSubview:self.labelForBottom1];
        [self.labelForBottom1 release];
        self.labelForBottom1.font = [UIFont fontWithName:@"ArialUnicodeMS" size:14.0];
        self.labelForBottom1.textAlignment = NSTextAlignmentCenter;
        
        self.labelForTop2 = [[UILabel alloc]init];
        [self.viewOfBack addSubview:self.labelForTop2];
        [self.labelForTop2 release];
        self.labelForTop2.font = [UIFont fontWithName:@"Arial" size:16.0];
        self.labelForTop2.textAlignment = NSTextAlignmentCenter;
        
        self.labelForBottom2 = [[UILabel alloc]init];
        [self.viewOfBack addSubview:self.labelForBottom2];
        [self.labelForBottom2 release];
        self.labelForBottom2.font = [UIFont fontWithName:@"ArialUnicodeMS" size:14.0];
        self.labelForBottom2.textAlignment = NSTextAlignmentCenter;
        
        self.labelForTop3 = [[UILabel alloc]init];
        [self.viewOfBack addSubview:self.labelForTop3];
        [self.labelForTop3 release];
        self.labelForTop3.font = [UIFont fontWithName:@"Arial" size:16.0];
        self.labelForTop3.textAlignment = NSTextAlignmentCenter;
        
        self.labelForBottom3 = [[UILabel alloc]init];
        [self.viewOfBack addSubview:self.labelForBottom3];
        [self.labelForBottom3 release];
        self.labelForBottom3.font = [UIFont fontWithName:@"ArialUnicodeMS" size:14.0];
        self.labelForBottom3.textAlignment = NSTextAlignmentCenter;
        
        self.labelForTop4 = [[UILabel alloc]init];
        [self.viewOfBack addSubview:self.labelForTop4];
        [self.labelForTop4 release];
        self.labelForTop4.font = [UIFont fontWithName:@"Arial" size:16.0];
        self.labelForTop4.textAlignment = NSTextAlignmentCenter;
        
        self.labelForBottom4 = [[UILabel alloc]init];
        [self.viewOfBack addSubview:self.labelForBottom4];
        [self.labelForBottom4 release];
        self.labelForBottom4.font = [UIFont fontWithName:@"ArialUnicodeMS" size:14.0];
        self.labelForBottom4.textAlignment = NSTextAlignmentCenter;
        
        self.labelForTop5 = [[UILabel alloc]init];
        [self.viewOfBack addSubview:self.labelForTop5];
        [self.labelForTop5 release];
        self.labelForTop5.font = [UIFont fontWithName:@"Arial" size:16.0];
        self.labelForTop5.textAlignment = NSTextAlignmentCenter;
        
        self.labelForBottom5 = [[UILabel alloc]init];
        [self.viewOfBack addSubview:self.labelForBottom5];
        [self.labelForBottom5 release];
        self.labelForBottom5.font = [UIFont fontWithName:@"ArialUnicodeMS" size:14.0];
        self.labelForBottom5.textAlignment = NSTextAlignmentCenter;
        
        self.imageView1 = [[UIImageView alloc]init];
        [self.viewOfBack addSubview:self.imageView1];
        [self.imageView1 release];
        
        self.imageView2 = [[UIImageView alloc]init];
        [self.viewOfBack addSubview:self.imageView2];
        [self.imageView2 release];
        
        self.imageView3 = [[UIImageView alloc]init];
        [self.viewOfBack addSubview:self.imageView3];
        [self.imageView3 release];
        
        self.imageView4 = [[UIImageView alloc]init];
        [self.viewOfBack addSubview:self.imageView4];
        [self.imageView4 release];
        
        self.imageView5 = [[UIImageView alloc]init];
        [self.viewOfBack addSubview:self.imageView5];
        [self.imageView5 release];
        [self handleNightModel];
    }
    return self;
}

- (void)handleNightModel{
    if ([[NSUserDefaults standardUserDefaults] boolForKey:@"夜间模式"]) {
        
        [DKNightVersionManager nightFalling];
        
    } else {
        
        [DKNightVersionManager dawnComing];
    }
    
    self.dk_backgroundColorPicker = DKColorWithColors([UIColor whiteColor], [UIColor colorWithRed:17 / 256.f green:27 / 256.f blue:47 / 256.f alpha:1]);
    self.labelForTop1.dk_textColorPicker = DKColorWithColors([UIColor blackColor], [UIColor whiteColor]);
    self.labelForTop2.dk_textColorPicker = DKColorWithColors([UIColor blackColor], [UIColor whiteColor]);
    self.labelForTop3.dk_textColorPicker = DKColorWithColors([UIColor blackColor], [UIColor whiteColor]);
    self.labelForTop4.dk_textColorPicker = DKColorWithColors([UIColor blackColor], [UIColor whiteColor]);
    self.labelForTop5.dk_textColorPicker = DKColorWithColors([UIColor blackColor], [UIColor whiteColor]);
    self.labelForBottom1.dk_textColorPicker = DKColorWithColors([UIColor blackColor], [UIColor whiteColor]);
    self.labelForBottom2.dk_textColorPicker = DKColorWithColors([UIColor blackColor], [UIColor whiteColor]);
    self.labelForBottom3.dk_textColorPicker = DKColorWithColors([UIColor blackColor], [UIColor whiteColor]);
    self.labelForBottom4.dk_textColorPicker = DKColorWithColors([UIColor blackColor], [UIColor whiteColor]);
    self.labelForBottom5.dk_textColorPicker = DKColorWithColors([UIColor blackColor], [UIColor whiteColor]);
    
}

- (void)passDataOfCellForTableViewSectionZero:(NSMutableArray *)arr{
    self.arrForSectionZero = [NSMutableArray arrayWithArray:arr];
    ModelOfCellForMyExploreTableViewSectionZero *model1 = [arr objectAtIndex:0];
    [self.button1 sd_setBackgroundImageWithURL:[NSURL URLWithString:model1.avatar] forState:UIControlStateNormal];
    [self.imageView1 sd_setImageWithURL:[NSURL URLWithString:model1.famous_icon]];
    self.labelForTop1.text = model1.name;
    self.labelForBottom1.text = model1.famous_type_title;
    [self.button1 addTarget:self action:@selector(passModelForSectionZeroButton1) forControlEvents:UIControlEventTouchUpInside];
    
    
    ModelOfCellForMyExploreTableViewSectionZero *model2 = [arr objectAtIndex:1];
    [self.button2 sd_setBackgroundImageWithURL:[NSURL URLWithString:model2.avatar] forState:UIControlStateNormal];
    [self.imageView2 sd_setImageWithURL:[NSURL URLWithString:model2.famous_icon]];
    self.labelForTop2.text = model2.name;
    self.labelForBottom2.text = model2.famous_type_title;
    [self.button2 addTarget:self action:@selector(passModelForSectionZeroButton2) forControlEvents:UIControlEventTouchUpInside];
    
    ModelOfCellForMyExploreTableViewSectionZero *model3 = [arr objectAtIndex:2];
    [self.button3 sd_setBackgroundImageWithURL:[NSURL URLWithString:model3.avatar] forState:UIControlStateNormal];
    [self.imageView3 sd_setImageWithURL:[NSURL URLWithString:model3.famous_icon]];
    self.labelForTop3.text = model3.name;
    self.labelForBottom3.text = model3.famous_type_title;
    [self.button3 addTarget:self action:@selector(passModelForSectionZeroButton3) forControlEvents:UIControlEventTouchUpInside];
    
    ModelOfCellForMyExploreTableViewSectionZero *model4 = [arr objectAtIndex:3];
    [self.button4 sd_setBackgroundImageWithURL:[NSURL URLWithString:model4.avatar] forState:UIControlStateNormal];
    [self.imageView4 sd_setImageWithURL:[NSURL URLWithString:model4.famous_icon]];
    self.labelForTop4.text = model4.name;
    self.labelForBottom4.text = model4.famous_type_title;
    [self.button4 addTarget:self action:@selector(passModelForSectionZeroButton4) forControlEvents:UIControlEventTouchUpInside];
    
    ModelOfCellForMyExploreTableViewSectionZero *model5 = [arr objectAtIndex:4];
    [self.button5 sd_setBackgroundImageWithURL:[NSURL URLWithString:model5.avatar] forState:UIControlStateNormal];
    [self.imageView5 sd_setImageWithURL:[NSURL URLWithString:model5.famous_icon]];
    self.labelForTop5.text = model5.name;
    self.labelForBottom5.text = model5.famous_type_title;
    [self.button5 addTarget:self action:@selector(passModelForSectionZeroButton5) forControlEvents:UIControlEventTouchUpInside];
}

- (void)passModelForSectionZeroButton1{
    ModelOfCellForMyExploreTableViewSectionZero *model = [self.arrForSectionZero objectAtIndex:0];
    [[NSNotificationCenter defaultCenter] postNotificationName:@"postModelForMyExploreSectionZero" object:nil userInfo:@{@"model":model}];
}

- (void)passModelForSectionZeroButton2{
    ModelOfCellForMyExploreTableViewSectionZero *model = [self.arrForSectionZero objectAtIndex:1];
    [[NSNotificationCenter defaultCenter] postNotificationName:@"postModelForMyExploreSectionZero" object:nil userInfo:@{@"model":model}];
}

- (void)passModelForSectionZeroButton3{
    ModelOfCellForMyExploreTableViewSectionZero *model = [self.arrForSectionZero objectAtIndex:2];
    [[NSNotificationCenter defaultCenter] postNotificationName:@"postModelForMyExploreSectionZero" object:nil userInfo:@{@"model":model}];
    
}

- (void)passModelForSectionZeroButton4{
    ModelOfCellForMyExploreTableViewSectionZero *model = [self.arrForSectionZero objectAtIndex:3];
    [[NSNotificationCenter defaultCenter] postNotificationName:@"postModelForMyExploreSectionZero" object:nil userInfo:@{@"model":model}];
}

- (void)passModelForSectionZeroButton5{
    ModelOfCellForMyExploreTableViewSectionZero *model = [self.arrForSectionZero objectAtIndex:4];
    [[NSNotificationCenter defaultCenter] postNotificationName:@"postModelForMyExploreSectionZero" object:nil userInfo:@{@"model":model}];
}

- (void)passDataOfCellForTableViewSectionTwo:(NSMutableArray *)arr{
    self.arrForSectionTwo = [NSMutableArray arrayWithArray:arr];
    ModelOfCellForMyExploreTableViewSectionTwo *model1 = [arr objectAtIndex:0];
    [self.button1 sd_setBackgroundImageWithURL:[NSURL URLWithString:model1.avatar] forState:UIControlStateNormal];
    [self.imageView1 sd_setImageWithURL:[NSURL URLWithString:model1.famous_icon]];
    self.labelForTop1.text = model1.name;
    self.labelForBottom1.text = model1.famous_type_title;
    [self.button1 addTarget:self action:@selector(passModelForSectionTwoButton1) forControlEvents:UIControlEventTouchUpInside];
    
    ModelOfCellForMyExploreTableViewSectionTwo *model2 = [arr objectAtIndex:1];
    [self.button2 sd_setBackgroundImageWithURL:[NSURL URLWithString:model2.avatar] forState:UIControlStateNormal];
    [self.imageView2 sd_setImageWithURL:[NSURL URLWithString:model2.famous_icon]];
    self.labelForTop2.text = model2.name;
    self.labelForBottom2.text = model2.famous_type_title;
    [self.button2 addTarget:self action:@selector(passModelForSectionTwoButton2) forControlEvents:UIControlEventTouchUpInside];
    
    ModelOfCellForMyExploreTableViewSectionTwo *model3 = [arr objectAtIndex:2];
    [self.button3 sd_setBackgroundImageWithURL:[NSURL URLWithString:model3.avatar] forState:UIControlStateNormal];
    [self.imageView3 sd_setImageWithURL:[NSURL URLWithString:model3.famous_icon]];
    self.labelForTop3.text = model3.name;
    self.labelForBottom3.text = model3.famous_type_title;
    [self.button3 addTarget:self action:@selector(passModelForSectionTwoButton3) forControlEvents:UIControlEventTouchUpInside];
    
    ModelOfCellForMyExploreTableViewSectionTwo *model4 = [arr objectAtIndex:3];
    [self.button4 sd_setBackgroundImageWithURL:[NSURL URLWithString:model4.avatar] forState:UIControlStateNormal];
    [self.imageView4 sd_setImageWithURL:[NSURL URLWithString:model4.famous_icon]];
    self.labelForTop4.text = model4.name;
    self.labelForBottom4.text = model4.famous_type_title;
    [self.button4 addTarget:self action:@selector(passModelForSectionTwoButton4) forControlEvents:UIControlEventTouchUpInside];
    
    ModelOfCellForMyExploreTableViewSectionTwo *model5 = [arr objectAtIndex:4];
    [self.button5 sd_setBackgroundImageWithURL:[NSURL URLWithString:model5.avatar] forState:UIControlStateNormal];
    [self.imageView5 sd_setImageWithURL:[NSURL URLWithString:model5.famous_icon]];
    self.labelForTop5.text = model5.name;
    self.labelForBottom5.text = model5.famous_type_title;
    [self.button5 addTarget:self action:@selector(passModelForSectionTwoButton5) forControlEvents:UIControlEventTouchUpInside];
}

- (void)passModelForSectionTwoButton1{
    ModelOfCellForMyExploreTableViewSectionTwo *model = [self.arrForSectionTwo objectAtIndex:0];
    [[NSNotificationCenter defaultCenter] postNotificationName:@"postModelForMyExploreSectionTwo" object:nil userInfo:@{@"model":model}];
}

- (void)passModelForSectionTwoButton2{
    ModelOfCellForMyExploreTableViewSectionTwo *model = [self.arrForSectionTwo objectAtIndex:1];
    [[NSNotificationCenter defaultCenter] postNotificationName:@"postModelForMyExploreSectionTwo" object:nil userInfo:@{@"model":model}];
}

- (void)passModelForSectionTwoButton3{
    ModelOfCellForMyExploreTableViewSectionTwo *model = [self.arrForSectionTwo objectAtIndex:2];
    [[NSNotificationCenter defaultCenter] postNotificationName:@"postModelForMyExploreSectionTwo" object:nil userInfo:@{@"model":model}];
    
}

- (void)passModelForSectionTwoButton4{
    ModelOfCellForMyExploreTableViewSectionTwo *model = [self.arrForSectionTwo objectAtIndex:3];
    [[NSNotificationCenter defaultCenter] postNotificationName:@"postModelForMyExploreSectionTwo" object:nil userInfo:@{@"model":model}];
}

- (void)passModelForSectionTwoButton5{
    ModelOfCellForMyExploreTableViewSectionTwo *model = [self.arrForSectionTwo objectAtIndex:4];
    [[NSNotificationCenter defaultCenter] postNotificationName:@"postModelForMyExploreSectionTwo" object:nil userInfo:@{@"model":model}];
}

- (void)layoutSubviews{
    
    [super layoutSubviews];
    
    self.viewOfBack.frame = self.contentView.frame;
    
    self.button1.frame = CGRectMake(10 * WIDTH, 15 * HEIGHT, (self.contentView.frame.size.width - 120 * WIDTH) / 5, (self.contentView.frame.size.width - 120 * WIDTH) / 5);
    self.button1.layer.cornerRadius = (self.contentView.frame.size.width - 120 * WIDTH) / 5 / 2;
    self.button1.layer.masksToBounds = YES;
    
    self.button2.frame = CGRectMake(10 * WIDTH + (self.contentView.frame.size.width - 120 * WIDTH) / 5 + 25 * WIDTH, 15 * HEIGHT, (self.contentView.frame.size.width - 100 * WIDTH) / 5, (self.contentView.frame.size.width - 120 * WIDTH) / 5);
    self.button2.layer.cornerRadius = (self.contentView.frame.size.width - 120 * WIDTH) / 5 / 2;
    self.button2.layer.masksToBounds = YES;
    
    self.button3.frame = CGRectMake(10 * WIDTH + (self.contentView.frame.size.width - 120 * WIDTH) / 5 * 2 + 25 * WIDTH * 2, 15 * HEIGHT, (self.contentView.frame.size.width - 120 * WIDTH) / 5, (self.contentView.frame.size.width - 120 * WIDTH) / 5);
    self.button3.layer.cornerRadius = (self.contentView.frame.size.width - 120 * WIDTH) / 5 / 2;
    self.button3.layer.masksToBounds = YES;
    
    self.button4.frame = CGRectMake(10 * WIDTH + (self.contentView.frame.size.width - 120 * WIDTH) / 5 * 3 + 25 * WIDTH * 3, 15 * HEIGHT, (self.contentView.frame.size.width - 120 * WIDTH) / 5, (self.contentView.frame.size.width - 120 * WIDTH) / 5);
    self.button4.layer.cornerRadius = (self.contentView.frame.size.width - 120 * WIDTH) / 5 / 2;
    self.button4.layer.masksToBounds = YES;
    
    self.button5.frame = CGRectMake(10 * WIDTH + (self.contentView.frame.size.width - 120 * WIDTH) / 5 * 4 + 25 * WIDTH * 4, 15 * HEIGHT, (self.contentView.frame.size.width - 120 * WIDTH) / 5, (self.contentView.frame.size.width - 120 * WIDTH) / 5);
    self.button5.layer.cornerRadius = (self.contentView.frame.size.width - 120 * WIDTH) / 5 / 2;
    self.button5.layer.masksToBounds = YES;
    
    self.labelForTop1.frame = CGRectMake(10 * WIDTH, 15 * HEIGHT + (self.contentView.frame.size.width - 120 * WIDTH) / 5, (self.contentView.frame.size.width - 120 * WIDTH) / 5, 20 * HEIGHT);
    self.labelForBottom1.frame = CGRectMake(10 * WIDTH, 35 * HEIGHT + (self.contentView.frame.size.width - 120 * WIDTH) / 5, (self.contentView.frame.size.width - 120 * WIDTH) / 5, 20 * HEIGHT);
    
    self.labelForTop2.frame = CGRectMake(10 * WIDTH + (self.contentView.frame.size.width - 120 * WIDTH) / 5 + 25 * WIDTH, 15 * HEIGHT + (self.contentView.frame.size.width - 120 * WIDTH) / 5, (self.contentView.frame.size.width - 120 * WIDTH) / 5, 20 * HEIGHT);
    self.labelForBottom2.frame = CGRectMake(10 * WIDTH + (self.contentView.frame.size.width - 120 * WIDTH) / 5 + 25 * WIDTH, 35 * HEIGHT + (self.contentView.frame.size.width - 120 * WIDTH) / 5, (self.contentView.frame.size.width - 120 * WIDTH) / 5, 20 * HEIGHT);
    
    self.labelForTop3.frame = CGRectMake(10 * WIDTH + (self.contentView.frame.size.width - 120 * WIDTH) / 5 * 2 + 25 * WIDTH * 2, 15 * HEIGHT + (self.contentView.frame.size.width - 120 * WIDTH) / 5, (self.contentView.frame.size.width - 120 * WIDTH) / 5, 20 * HEIGHT);
    self.labelForBottom3.frame = CGRectMake(10 * WIDTH + (self.contentView.frame.size.width - 120 * WIDTH) / 5 * 2 + 25 * WIDTH * 2, 35 * HEIGHT + (self.contentView.frame.size.width - 120 * WIDTH) / 5, (self.contentView.frame.size.width - 120 * WIDTH) / 5, 20 * HEIGHT);
 
    self.labelForTop4.frame = CGRectMake(10 * WIDTH + (self.contentView.frame.size.width - 120 * WIDTH) / 5 * 3 + 25 * WIDTH * 3, 15 * HEIGHT + (self.contentView.frame.size.width - 120 * WIDTH) / 5, (self.contentView.frame.size.width - 120 * WIDTH) / 5, 20 * HEIGHT);
    self.labelForBottom4.frame = CGRectMake(10 * WIDTH + (self.contentView.frame.size.width - 120 * WIDTH) / 5 * 3 + 25 * WIDTH * 3, 35 * HEIGHT + (self.contentView.frame.size.width - 120 * WIDTH) / 5, (self.contentView.frame.size.width - 120 * WIDTH) / 5, 20 * HEIGHT);
    
    self.labelForTop5.frame = CGRectMake(10 * WIDTH + (self.contentView.frame.size.width - 120 * WIDTH) / 5 * 4 + 25 * WIDTH * 4, 15 * HEIGHT + (self.contentView.frame.size.width - 120 * WIDTH) / 5, (self.contentView.frame.size.width - 120 * WIDTH) / 5, 20 * HEIGHT);
    self.labelForBottom5.frame = CGRectMake(10 * WIDTH + (self.contentView.frame.size.width - 120 * WIDTH) / 5 * 4 + 25 * WIDTH * 4, 35 * HEIGHT + (self.contentView.frame.size.width - 120 * WIDTH) / 5, (self.contentView.frame.size.width - 120 * WIDTH) / 5, 20 * HEIGHT);
    
    self.imageView1.frame = CGRectMake((self.contentView.frame.size.width - 120 * WIDTH) / 5 - 8 * WIDTH, (self.contentView.frame.size.width - 120 * WIDTH) / 5 - 4 * HEIGHT, (self.contentView.frame.size.width - 120 * WIDTH) / 5 / 4 + 3 * WIDTH, (self.contentView.frame.size.width - 120 * WIDTH) / 5 / 4 + 3 * WIDTH);
   
    self.imageView2.frame = CGRectMake((self.contentView.frame.size.width - 120 * WIDTH) / 5 - 8 * WIDTH + (self.contentView.frame.size.width - 120 * WIDTH) / 5 + 25 * WIDTH, (self.contentView.frame.size.width - 120 * WIDTH) / 5 - 4 * HEIGHT, (self.contentView.frame.size.width - 120 * WIDTH) / 5 / 4 + 3 * WIDTH, (self.contentView.frame.size.width - 120 * WIDTH) / 5 / 4 + 3 * WIDTH);
   
    self.imageView3.frame = CGRectMake((self.contentView.frame.size.width - 120 * WIDTH) / 5 - 8 * WIDTH + ((self.contentView.frame.size.width - 120 * WIDTH) / 5 + 25 * WIDTH) * 2, (self.contentView.frame.size.width - 120 * WIDTH) / 5 - 4 * HEIGHT, (self.contentView.frame.size.width - 120 * WIDTH) / 5 / 4 + 3 * WIDTH, (self.contentView.frame.size.width - 120 * WIDTH) / 5 / 4 + 3 * WIDTH);
   
    self.imageView4.frame = CGRectMake((self.contentView.frame.size.width - 120 * WIDTH) / 5 - 8 * WIDTH + ((self.contentView.frame.size.width - 120 * WIDTH) / 5 + 25 * WIDTH) * 3, (self.contentView.frame.size.width - 120 * WIDTH) / 5 - 4 * HEIGHT, (self.contentView.frame.size.width - 120 * WIDTH) / 5 / 4 + 3 * WIDTH, (self.contentView.frame.size.width - 120 * WIDTH) / 5 / 4 + 3 * WIDTH);
   
    self.imageView5.frame = CGRectMake((self.contentView.frame.size.width - 120 * WIDTH) / 5 - 8 * WIDTH + ((self.contentView.frame.size.width - 120 * WIDTH) / 5 + 25 * WIDTH) * 4, (self.contentView.frame.size.width - 120 * WIDTH) / 5 - 4 * HEIGHT, (self.contentView.frame.size.width - 120 * WIDTH) / 5 / 4 + 3 * WIDTH, (self.contentView.frame.size.width - 120 * WIDTH) / 5 / 4 + 3 * WIDTH);

}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
